package cn.itsource.feign.client;

import cn.itsource.feign.fallback.TenantFeignFallbcakFactory;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-system", fallbackFactory = TenantFeignFallbcakFactory.class)
public interface TenantFeign {

    //根据用户ID获取用户所属机构信息
    @GetMapping("/tenant/getTenantInfoByUserId/{userId}")
    JSONResult getTenantInfoByUserId(@PathVariable("userId") Long userId);

}